package parkshop.pmcourse.mapping;

import java.util.List;

import parkshop.pmcourse.domain.Orders;
import parkshop.pmcourse.dto.PageBean;

public interface OrdersMapper {

	int insertSelective(Orders orders);
	int deleteByPrimaryKey(Long id);
	
	List<Orders> selectAllOrders(PageBean pageBean);
	List<Orders> selectStatusAllOrders(PageBean pageBean);
	
	int selectOrdersCount();
	int selectStatusOrdersCount();
	
	List<Orders> selectAllOrdersByCustomerId(PageBean pageBean);// 将 customer id传递给 pageBean 的 Id
	int selectOrdersCountByCustomerId(Long customerId);
	
	List<Orders> selectStatusOrdersByCustomerId(PageBean pageBean);// 将 customer id传递给 pageBean 的 Id
	int selectStatusOrdersCountByCustomerId(PageBean pageBean);
	
	List<Orders> selectOrdersByShopId(PageBean pageBean);
	int selectOrdersCountByShopId(Long shopId);
	
	List<Orders> selectStatusOrdersByShopId(PageBean pageBean);
	int selectStatusOrdersCountByShopId(PageBean pageBean);
	
	List<Orders> selectOrdersByAdministrator(PageBean pageBean);
	
	int updateByPrimaryKeySelective(Orders orders);
	
	Orders selectByPrimaryKey(Long id);
	
	Orders selectByCustomerIdAndOrderTime(PageBean pageBean);
	
	List<Orders> selectAllByShopIdAndDateWithStatus(PageBean pagebean);// 卖家获取某个时间戳至今的自己店铺的所有订单
	List<Orders> selectAllByCustomerIdAndDateWithStatus(PageBean pagebean);// customer 获取某个时间段的特定状态的订单
	List<Orders> selectByAdministratorAndDate(PageBean pagebean);// 管理员获取某个时间戳至今的所有的订单
	
	List<Orders> selectAllByShopIdAndDateWithAboveRangeStatus(PageBean pageBean);
	List<Orders> selectAllByCustomerIdAndDateWithAboveRangeStatus(PageBean pageBean);
	List<Orders> selectByAdministratorAndDateWithAboveRangeStatus(PageBean pageBean);
	
	
	
}
